package com.library.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.library.base.BaseController;
import com.library.base.R;
import com.library.domain.pojo.LendRecord;
import com.library.service.LendRecordService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author : 凉小天
 * @date : 2021/7/1 15:36
 */
@RestController
@RequestMapping("/lendRecord")
public class LendRecordController extends BaseController {

    @Resource
    private LendRecordService lendRecordService;

    /**
     * 分页查询所有数据
     */

    @GetMapping("/list")
    public R selectAll(Page<LendRecord> page,String username,String bookName,Long readerId){
        return result(this.lendRecordService.page(page,username,bookName,readerId));
    }
}
